﻿/*
 * @Autor: PK
 * @Date: 2021-03-31 16:36:36
 * @Description: 内部服务台充电桩的实现
 */

using System;
using ShkSimulation.core.dao.statistic;
using ShkSimulation.core.template.agency;
using ShkSimulation.core.template.customer;

namespace ShkSimulation.carsharing.impl.elements {

    public class ChargeAgency : InternalAgency, DataReporter {

        private readonly double chargeEffecience;

        public ChargeAgency(double chargeEffecience) {
            ServeTime = InternalAgencyServeTime.BeforeArrive | InternalAgencyServeTime.BeforeServe;
            this.chargeEffecience = chargeEffecience;
        }

        public sealed override InternalAgencyServeTime ServeTime { get; set; }

        public override InternalServeResult BeforeParentArrive(Customer customer) {
            //Console.WriteLine("{2} {0} 开始在站台 {1} 内部服务台充电", customer.Name, this.ParentAgency.Name, ClockTime);
            return InternalServeResult.Continue();
        }

        public override InternalServeResult BeforeParentServe(Customer customer) {
            //Console.WriteLine("{2} {0} 正在站台 {1} 内部服务台充电中", customer.Name, this.ParentAgency.Name, ClockTime);
            return InternalServeResult.Continue();
        }

        public override InternalServeResult BeforeParentDepart(Customer customer) {
            return InternalServeResult.Continue();
        }

        public string Uniquekey => $"{ParentAgency.Name}[charge]";

        public event Action<DataReporter> ReportToCollection;

        public DataReportInfo GetReportInfo() {
            return DataReportInfo.Empty();
        }

    }
}
